package hufu.service.controller;

import hufu.service.service.StockTypeService;
import hufu.service.util.HufuConstants;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import xframe.db.page.PageInfo;
import xframe.db.page.PageNavBuilder;
import xframe.db.page.PageUtils;
/**
 * 股指类型
 * @author guanyingjia
 *
 */
@Controller
public class StockTypeController {
	@Autowired
	public StockTypeService stockTypeService;
	@Autowired
	public PageNavBuilder pageNavBuilder;
	@RequestMapping
	public ModelAndView getStockTypeSkip(HttpServletRequest request,HttpServletResponse response)throws Exception{
		PageInfo pageInfo = PageUtils.parseRequest(request);
		pageInfo.setPageSize(HufuConstants.PAGE_SIZE);
		stockTypeService.getStockTypeList(pageInfo);
		pageNavBuilder.buildNavigationText(pageInfo);
		Map model=new HashMap();
		model.put("pageInfo", pageInfo);
		return new ModelAndView("/stock/stockType/getStockTypeSkip.jsp");
	}
}
